package com.briup.day16;

import java.io.FileReader;
import java.io.IOException;
import java.util.Properties;

/**
 * @author 谭梦寻
 * @version 1.1
 */
public class DbUtils {
    private static Properties properties;
    static {
        properties = new Properties();
        try {
            properties.load(new FileReader("db.properties"));
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
    private DbUtils() {

    }
    public static String getUserName() {
        System.out.println(properties.getProperty("username"));
        return properties.getProperty("username");
    }

    public static void main(String[] args) {
        getUserName();
    }
}
